package rmi;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
/**
 * @author Xewee.Zhiwei.Wang
 * @version 2011-10-11 下午02:37:07
 */
public class ArithmeticRemoteImpl extends UnicastRemoteObject implements ArithmeticRemoteInterface {
	private static final long serialVersionUID = 1L;
	protected ArithmeticRemoteImpl() throws RemoteException {
	}
	/* (non-Javadoc)
	 * @see rmi.RemoteInterface#add(int, int)
	 */
	@Override
	public int add(int num1, int num2) throws RemoteException {
		// TODO Auto-generated method stub
		return num1 + num2;
	}
	/* (non-Javadoc)
	 * @see rmi.RemoteInterface#div(int, int)
	 */
	@Override
	public float div(int num1, int num2) throws RemoteException {
		// TODO Auto-generated method stub
		return (float) num1 / (float) num2;
	}
	/* (non-Javadoc)
	 * @see rmi.RemoteInterface#mul(int, int)
	 */
	@Override
	public int mul(int num1, int num2) throws RemoteException {
		// TODO Auto-generated method stub
		return num1 * num2;
	}
/* (non-Javadoc)
	 * @see rmi.RemoteInterface#sub(int, int)
	 */
	@Override
	public int sub(int num1, int num2) throws RemoteException {
		// TODO Auto-generated method stub
		return num1 - num2;
	}
}
